package com.ruicar.afs.cloud.product.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.common.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author yaorui.zhang
 * @date 2020年5月16日13:28:21
 */
@Data
@TableName("product_rule_info")
@ApiModel(value = "产品规则信息")
public class ProductRuleInfo extends BaseEntity<ProductRuleInfo> {

    @ApiModelProperty(value = "适用场景")
    private String fitScope;

    @ApiModelProperty(value = "方案ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private String planId;

    @ApiModelProperty(value = "规则名称")
    private String ruleName;

    @ApiModelProperty(value = "输出信息")
    private String outputInfo;

    @ApiModelProperty(value = "规则状态")
    private String ruleStatus;

    @ApiModelProperty(value = "规则ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long ruleId;

    @ApiModelProperty(value = "规则展示")
    private String ruleExpress;

    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    @ApiModelProperty(value = "利率取值方式=0,系数值;1,加减值")
    private String interestRateType;

    @ApiModelProperty(value = "利率值")
    private BigDecimal interestRateValue;

    @ApiModelProperty(value = "最高贴息额")
    private BigDecimal moneyMax;

    @ApiModelProperty(value = "激活状态")
    private String activeStatus;

}
